Data processor for detecting identical data coexisting in a plurality of data section of data transmission paths

ABSTRACT

So-called template matching processing is function-distributed into a pre-detecting portion and a template matching portion, processing in the respective portions being achieved by a hardware circuit. In the pre-detecting portion, the relationship between data which simultaneously exist in the determined comparing sections on data transmission paths, and matching processing is performed in advance with respect to data to be matched. The template matching portion includes an addressing type general-purpose memory and performs main processing of template matching based on the result of the comparison and determination in the pre-detecting portion.

This application is a divisional of copending application Ser. No. 07/260,061, filed on Oct. 20, 1988 now U.S. Pat. No. 5,113,339, issued on May 12, 1992. The entire contents of this application is hereby incorporated by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a data processor, and more particularly, to an apparatus for determining the relationship between a plurality of data to perform template matching.

2. Description of the Prior Art

In a conventional von-Neumann computer, various instructions are stored in advance as programs in a program memory, and addresses in the program memory are sequentially specified by a program counter so that the instructions are sequentially read out. Thereafter, the instructions are executed.

On the other hand, a data flow type information processor is one of a non von-Neumann type computer having no concept of sequential execution of instructions by a program counter. Such a data flow type information processor employs architecture based on parallel processing of instructions. In the data flow type information processor, immediately after data which are objects of an operation are collected, an instruction can be executed. Further, and a plurality of instructions are simultaneously driven by the data, so that programs are executed in parallel in accordance with the natural flow of the data. As a result, it is considered that the time required for the operation is significantly reduced.

FIG. 1 is a block diagram showing one example of a structure of a conventional data flow type information processor to which the present invention is applied. In addition, FIG. 2 is a diagram showing one example of a field structure of a data packet processed by the information processor.

The data packet shown in FIG. 2 comprises a destination field, a data 1 field, and a data 2 field. The destination field stores destination information, the instruction field stores instruction information, and the data 1 field or the data 2 field stores operand data.

The information processor shown in FIG. 1 comprises a program storing portion 1, a paired data detecting portion 2, and an operation processing portion 3. A data flow program shown in FIG. 3 is stored in the program storing portion 1. The program storing portion 1 reads out destination information and instruction information in the data flow program as shown in FIG. 3, by addressing based on the destination information in the inputted data packet, respectively stores the destination information and the instruction information in the destination field and the instruction field in the data packet, and outputs the data packet. The paired data detecting portion 2 queues the data packet outputted from the program storing portion 1. That is, it detects different two data packets having the same destination information, stores operand two data in one of the data packets out of the data packets, for example, the content of the data 1 field shown in FIG. 2 in the data 2 field in the other data packet, and outputs the other data packet. The operation processing portion 3 performs operation processing based on the instruction information with respect to the data packet outputted from the paired data detecting portion 2, stores the result in the data 1 field in the data packet and outputs the data packet to the program storing portion 1.

Meanwhile, the program storing portion 1 and the paired data detecting portion are coupled to each other by two data transmission paths 4. The data transmission paths 4 are coupled to two input ports of the paired data detecting portion 2. The data packet outputted from the program storing portion 1 is selectively inputted to either one of the input ports of the paired data detecting portion 2 depending on whether the operand data is right operand data or left operand data in the operation processing. In addition, the paired data detecting portion 2 and the operation processing portion 3 are coupled to each other by a transmission path 5, and the operation processing portion 3 and the program storing portion 1 are coupled to each other by a transmission path 6.

The data packet circulates through the program storing portion 1, the paired data detecting portion 2, and the operation processing portion 3 in that order, so that operation processing based on the data flow program stored in the program storing portion 1 progresses.

Meanwhile, in the above described paired data detecting portion 2, paired data are detected according to a so-called template matching system. Conventionally, as this template matching system, the following are known: a system of performing processing in a hardware manner using a semiconductor memory device (associative memory) having an associative function, and a system of performing processing in a software manner using a general-purpose memory and a large capacity external memory.

Conventionally, as a semiconductor memory device having an associative function, a semiconductor memory device has been known which is disclosed in, for example, Technical Report of Institute of Electronic and Communication Engineers of Japan (1983) SSD 83-78, pp. 45-52. The semiconductor memory device is a so-called logic-in memory comprising a plurality of memory cells each having a collating and comparing circuit. The logic-in memory as described in the above described document, in which all the memory cells determine collation, is also referred to as a full-associative memory. The full-associative memory comprises a memory cell array having a plurality of memory cells arranged in rows and columns. In the full-associative memory, all the memory cells have a function of determining collation, so that a search along a word direction (row direction) in the memory cell array, and a search along a bit direction (column direction) can be made based on an input of a key word. More specifically, complete determination of collation along the word direction and the bit direction is made.

Thus, in the full-associative memory, complete determination of collation can be made while the area of a unit memory cell is increased. Therefore, the area of the full-associative memory shown in the above described document is increased by approximately six times that of a general-purpose dynamic memory having the same storage capacity.

Additionally, if complete determination of collation is not required, that is, partial determination of collation or determination of collation depending on the condition is made, it becomes redundant to have comparing logic circuits for determination of collation in all the memory cells. Therefore, it is not economic as a semiconductor device.

Thus, if the template matching system is achieved using the associative memory, there is a problem in that it is difficult to configure a large-scale system to a small size, at a low cost.

On the other hand, a case, in which the template matching system is achieved in a software manner without using a special memory, such as the associative memory is superior to a case using the associative memory in terms of memory capacity and economy. On the contrary, the search time of data is greatly fluctuated depending on the value and the content of data. Therefore, another problem occurs in that it is difficult to perform matching processing of all data at a constant processing time, and either the processing speed is reduced or the processing efficiency is decreased.

SUMMARY OF THE INVENTION

An object of the present invention is to provide a small-sized and low-cost data processor having excellent speed performance.

Another object of the present invention is to provide a data processor particularly applied to a paired data detecting portion in a data flow type information processor.

In the present invention, an addressing type general-purpose memory (a memory of a type of reading out or writing data by addressing) such as an SRAM and a DRAM is employed so that memory capacity per unit area is made larger, as compared with that of an associative memory, whereby the device is minimized in size and the cost is reduced. Furthermore, matching processing is performed by a hardware circuit, so that high-speed processing is achieved. More specifically, there are provided a pre-detecting portion for performing pre-processing of template matching and a template matching portion for performing main processing of the template matching based on the result of processing in this pre-detecting portion. The pre-detecting portion compares and determines the relationship between data which reach simultaneously or close to each other on a time basis, adds the result of the determination to the data as a flag, and sends out the same to the template matching portion in the succeeding stage. The template matching portion comprises an addressing type general-purpose memory. Data which has already been inputted but has not been matched yet is written into this general-purpose memory so as to queue data to be paired with each other. The template matching portion accesses the general-purpose memory based on the inputted data, and performs matching processing for detecting the paired data. If matching is achieved in the pre-detecting portion, it is adapted such that access of the general-purpose memory is not made in the template matching portion. Thus, the frequency of access of the general purpose memory in the template matching portion can be lowered, so that the processing speed is improved.

The foregoing and other objects, features, aspects and advantages of the present invention will become more readily apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing one example of a structure of a conventional data flow type information processor to which the present invention can be applied;

FIG. 2 is diagram showing one example of a field structure of a data packet processed by the information processor shown in FIG. 1;

FIG. 3 is a diagram showing a data flow program stored in a program storing portion 1 shown in FIG. 1;

FIG. 4 is a block diagram showing a structure in one embodiment of the present invention;

FIG. 5 is a block diagram showing simply an internal structure of a pre-detecting portion 7 shown in FIG. 4;

FIG. 6 is a block diagram showing simply an internal structure of a template matching portion 8 shown in FIG. 4;

FIG. 7 is a block diagram showing a structure in one embodiment of a pre-detecting portion having two input ports and two parallel data transmission paths;

FIG. 8 is a block diagram showing a structure in another embodiment of a pre-detecting portion having two input ports and two parallel data transmission paths;

FIG. 9 shows a self-synchronization type buffer storage mechanism according to handshaking transfer control in one embodiment of a transmission control circuit employed in the data transmission paths shown in FIG. 8;

FIG. 10 is a block diagram showing a structure in one embodiment of a template matching portion having two input ports and two parallel data transmission paths;

FIG. 11 is a block diagram showing a structure in another embodiment of a template matching portion;

FIG. 12 is a diagram showing a structure in one embodiment of memory reading portions 802A and 802B shown in FIG. 10 (or FIG. 11);

FIG. 13 is a diagram showing a structure in one embodiment of memory writing portions 805A and 805B shown in FIG. 10 (or FIG. 11);

FIG. 14 is a block diagram showing a structure in still another embodiment of a template matching portion;

FIG. 15 is a diagram showing a structure in one embodiment of a processing arbitrating circuit 8002 shown in FIG. 14; and

FIG. 16 is a circuit diagram in one embodiment of a state storing circuit used in the processing arbitrating circuit 8002;

DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 4 is a block diagram showing a structure in one embodiment of the present invention. As shown in the figure, a data processor according to the present embodiment comprises a pre-detecting portion 7 and a template matching portion 8. FIG. 5 is a block diagram showing a structure in one embodiment of a case of a two-parallel type pre-detecting portion 7. As shown in the figure, the pre-detecting portion 7 comprises data transmission paths 71A and 71B, a data detecting portion 72, a comparing and determining portion 73, and a flag generating portion 74. FIG. 6 is a block diagram showing a structure in one embodiment of a case of a two-parallel type template matching portion 8. As shown in the figure, the template matching portion 8 comprises data transmission paths 81A and 81B, a matching memory 82, coincidence determining portions 83A and 83B, data processing portions 84A and 84B, a memory access control portion 85. Meanwhile, as the matching memory 82, an addressing type general-purpose memory is used. The addressing type general-purpose memory is a memory, such as an SRAM and a DRAM, of a type for reading out data or writing in data by addressing. The data transmission paths 71A, 71B, 81A and 81B are data transmission paths constructed by shift registers in a plurality of stages of transfer which is controlled by a common clock and in which data can be held, or data transmission paths constructed by a self-synchronization type buffer storage mechanism according to handshaking transfer control.

In the pre-detecting portion 7, the data detecting portion 72 detects, with respect to data inputted to the data transmission path 71A or 71B, a period during which identifiers of the data simultaneously exist in an identifier comparing section A or B on the opposed data transmission paths, the comparing and determining portion 73 compares the identifiers in the above described period, to transmit the result of the comparison to the flag generating portion 74. Thus, the flag generating portion generates a flag based on the result of the comparison. The above described flag, obtained by the flag generating portion 74, is added to the data transmitted through the data transmission paths 71A and 71B.

Outputs of the data transmission paths 71A and 71B in the pre-detecting portion 7 and inputs of the data transmission paths 81A and 81B in the template matching portion 8 are respectively connected to each other. In the template matching portion 8, the following processing is performed with respect to the data having the above described flag added in the pre-detecting portion 7 and inputted to the data transmission path 81A or 81B. More specifically, if the above described flag indicating that data having identifiers matching each other exist in the opposed data transmission paths 81A and 81B is added to the inputted data, the data is made to wait until the data having identifiers matching each other arrives at the opposed data transmission paths 81A and 81B. Immediately after arrival, both the data are combined, to be outputted. In addition, if the above described flag indicating that access contention to the matching memory 82 occurs between inputted data in the opposed data transmission paths and the priority of the data is lower, is added to the inputted data, the data is made to wait without making access to the matching memory 82 until a queuing region in the matching memory 82, allocated to the data is emptied. In addition, if data other than the above described data is inputted, data in the queuing region in the matching memory 82 corresponding to the identifier of the data is read out, and the identifiers of the data and the data, as read out, are compared with each other by the match determining portions 83A and 83B. In the data processing portions 84A and 84B, if the result of determination of a match of the identifiers by the above described match determining portions 83A and 83B indicates a match, both the data are combined, to be outputted, so that the queuing region in the matching memory is emptied. If the above described result of the determination of a match indicates a mismatch, access contention occurs between the data. Thus, higher-priority data is written into the matching memory 82 so that the data is made to wait in the queuing region while the other data is made to wait until the queuing region is emptied. If and when the queuing region is emptied, the data is written, so that queuing is performed.

In the memory access control portion 85, in a period during which memory access is made in response to a memory access request, memory access by another data is made to wait in response to transmission path control signals A and B, so that a plurality of times of memory access are avoided being simultaneously made. Access to a matching memory is made in the order of reading and writing with respect to data inputted to the same transmission path 81A or 81B, and reading is not carried out until writing of the previous data is terminated with respect to continuously inputted data.

According to the above described embodiment shown in FIGS. 4 to 6, a plurality of identifiers is caused to correspond to a single address in the matching memory 82, so that memory capacity as a queuing region can be reduced.

Additionally, identifiers of data between opposed data transmission paths are compared with each other by the pre-detecting portion 7 and a determination flag is added. Thus, when the above described flag of the data in the template matching portion 8 indicates a match of the identifiers, and when the data access the same memory address and the priority is low, access to the above described matching memory 82 is not made so that the frequency of memory access can be reduced. When first reading by one data is performed between different data transmission paths and then, a second reading by the other data is performed, before writing is performed and access contention occurs between the data, it can not be said that the second data read out later is right. Thus, also in the case of the above described input condition, access contention ca be detected by the above described determination flag, and contradiction can be avoided by making wait access to the above described matching memory 82 with respect to the lower-priority data.

The present invention will be apparent, more specifically, by describing structures of the above described pre-detecting portion and template matching portion in more detail.

(1) Details of pre-detecting portion

FIG. 7 is a block diagram showing a structure in one embodiment of a pre-detecting portion having two input ports and two parallel data transmission paths. As shown in the figure, this pre-detecting portion comprises data transmission paths 701A and 701B, data detecting portions 702A and 702B each having a function of detecting the fact that data exists in a finite section on the data transmission path, a comparing and determining portion 703 having a function of comparing two identifiers each comprising a part or all of data to be inputted for identifying the data and determining the result of the comparison, data processing portions 704A and 704B each having a function of processing two data to be inputted in accordance with the result of the determination by the above described comparing and determining portion 703, and a coexistence detecting portion 705 having a function of detecting the fact that data simultaneously exist in comparing sections on the above described two data transmission paths. The data transmission paths 701A and 701B are lines each constructed by shift registers in a plurality of stages, transfer of which is controlled by a common clock CK and capable of holding data, the data being transmitted at a rate peculiar to the data transmission path. A period during which the data passes through the comparing section A or B is detected by the data detecting portion 702A or 702B, a part or all of the data (i.e. data of an identifier) required for comparison is extracted and held in the corresponding data detecting portion 702A or 702B, and comparison is made by the comparing and determining portion 703. If and when the coexistence detecting portion 705 detects the fact that there is a common period in periods during which the data detected by the data detecting portions 702A and 702B stay in the above described comparing sections on the data transmission paths, namely, the data simultaneously exist in the above described comparing sections A and B, processing are performed in the data processing portions 704A and 704B using the result of the comparison by the comparing and determining portion 703. The respective numbers of stages of the data transmission paths are made coincident with each other such that the time required for comparing and determining the above described data becomes equal to the time when the data is transmitted from the comparing section A or B. Therefore, in accordance with the result of the comparison by the comparing and determining portion 703, the data, as transmitted, can be processed by the data processing portion 704A or 704B provided between the stages of the data transmission path. If the time required for processing data is shorter than the inherent transmission time of the data transmission path, the data can be processed without disturbing transmission of the data. On the other hand, if the time required for processing data is longer than the inherent transmission time of the data transmission path, a function element of the processing is divided and arranged such that the time required for the processing falls below the inherent time of the data transmission path, to perform processing in a pipeline manner, whereby the data can be processed without disturbing transmission of the data.

FIG. 8 is a block diagram showing a structure according to another embodiment of a pre-detecting portion having two input ports and two parallel data transmission paths. The difference from the first embodiment shown in FIG. 7 is that data transmission paths 701A' and 701B' are constructed by a self-synchronization type buffer storage mechanism according to handshaking transfer control as shown in FIG. 9. Thus, fluctuations in dynamic and local transfer rate can be absorbed. In the present embodiment, a transmission signal and an authorizing signal for handshaking control are sent and received between stages of the transmission paths. However, a function and an operation as a data processor are all the same as those in the first embodiment shown in FIG. 7.

In the case in which three or more data transmission paths are provided in parallel in the pre-detecting portion, the same processing as that in the case of the above described two-parallel type with respect to a combination of any arbitrary two data transmission paths, out of the plurality of data transmission paths. In addition, with respect to data transmitted through three or more data transmission paths out of the plurality of data transmission paths, a coexistence detecting portion 705 and a comparing and determining portion 703 deal with three or more data, so that the data can be processed in the similar system.

FIG. 9 shows one embodiment of a transmission control circuit used in the data transmission paths 701A' and 701B' shown in FIG. 8, showing a self-synchronization type buffer storage mechanism according to handshaking transfer control. Each of the data transmission paths 701A' and 701B' is structured by successively connecting the above described self-synchronization type buffer storage mechanisms in a plurality of stages. In FIG. 9, a transmission control element 11 performs handshaking with a transmission control element in the self-synchronization type buffer storage mechanisms connected in front and behind, transmission signals 15 and 17 and authorizing signals 16 and 18, to generate a data latch control signal 14 in accordance with the state of a transmission control element connected to the next stage. A buffer 12 is a circuit for operating a data latch 13 in response to the data latch control signal 14. The data latch 13 is constructed by at least one data holding mechanism, holding and passing of data are controlled by the data latch control signal 14. Although the data processor shown in FIGS. 7 and 8 is suitable for a pre-detecting portion in a paired data detecting portion in a data flow type information unit, it is not limited to the same. Furthermore, it can be widely employed in the whole data processing system in which asynchronous data are inputted in parallel, to perform processing for comparison and determination between the inputted data.

(2) Details of template matching portion

FIG. 10 is a block diagram showing a structure of one embodiment of a template matching portion having two input ports and two parallel data transmission paths. As shown in the figure, this template matching portion comprises data transmission paths 801A and 801B, memory reading portions 802A and 802B, comparing and determining portions 803A and 803B, data processing portions 804A and 804B, memory writing portions 805A and 805B, a matching memory 806, and a memory access control circuit 807. The data transmission paths 801A and 801B are a data transmission path constituted by, for example, shift registers in a plurality of stages, transfer of which is controlled by a common clock and is capable of holding data or a data transmission path constituted by a self-synchronization type buffer storage mechanism, according to handshaking transfer control, a data holding mechanism (data latch) constituting the data transmission path being controlled by the common clock or a transmission control signal generated by the above described self-synchronization type buffer storage mechanism, by control of the above described data transmission paths. Meanwhile, as the self-synchronization type buffer storage mechanism, one shown in, for example, FIG. 9 is used.

With respect to data inputted to the data transmission path 801A or 801B, the memory reading portion 802A or 802B reads out from the matching memory 806 data in an address corresponding to an identifier comprising a part or all of the data for identifying the data. The comparing and determining portion 803A or 803B compares the identifiers of the data read out from the matching memory 806 by the above described memory reading portion 802A or 802B and the inputted data and determines the relation between the data. If and when the above described identifiers of the packet data exist in a first word, first words are compared with each other and determined, so that the result of the comparison and determination is held until the first word of the next packet data reaches the comparing and determining portion. The data processing portion 804A or 804B performs processing, for example, changes a part or all of each data based on the result of determination obtained by the above described comparing and determining portion 803A or 803B and replaces the inputted data with the content of the data read out from the above described matching memory 806, to further send out each data processed based on the result of the processing to a predetermined data transmission path. Furthermore, the memory writing portion 805A or 805B writes any one of the above described data into a address corresponding to the identifier of the data in the above described matching memory based on the above described result of the determination or erases data in an address corresponding to the identifier of the data in the above described matching memory 806.

The above described series of pipeline processing is sequentially performed with respect to one input data, so that there is no contention of memory access requests. However, if and when data are successively inputted to the same data transmission path or inputted in parallel to different data transmission paths, there is contention of the memory access requests. The memory access control circuit 807 applies a memory access authorizing signal (reading authorizing signal A/B or writing authorizing signal A/B) to only one portion within the memory access portion in the memory reading portions 802A and 802B and the memory writing portions 805A and 805B, to authorize memory access. With respect to authorization of memory access, a memory access portion in which a memory access request is generated is given priority. When there is contention between a plurality of memory accesses, the memory access portion 802A, 802B, 805A or 805B in which a memory access request is earliest generated is given priority. The memory access portion in which memory access is authorized generates a memory access executing signal (reading executing signal A/B and writing executing signal A/B) indicating a period during which a memory is accessed, and does not authorize memory access in another memory access portion during the memory access period while authorizing memory access in a memory access portion in which another memory access request is generated immediately after memory access being executed is terminated. Thus, the data transmission paths are controlled by the memory access authorizing signal in a period during which memory access is made in response to the memory access request so that memory access by another data is made to wait, whereby a plurality of memory accesses are avoided as being simultaneously made.

FIG. 11 is a diagram showing a structure in a case in which the comparing and determining portion 803A and the data processing portion 804A or the comparing and determining portion 803B and the data processing portion 804B as shown in FIG. 10 are respectively executed in the same pipeline stage. Thus, a structure can be arbitrarily achieved depending on the execution time of pipeline processings processing in which a plurality of pipeline processing are performed in a single pipeline stage in the range which falls in the transmission delay time per stage of the data transmission path, and processing which does not fall in the transmission delay time per one stage is divided into a plurality of pipeline stages.

According to the above described embodiment shown in FIGS. 10 and 11, the execution time of pipeline processing of each circuit provided on a data transmission path falls below the transmission delay time per one stage of the data transmission path, so that data transmission is not disturbed as long as memory accesses are not overlapped with each other, whereby data can be inputted from an input port at a time interval determined by the capability of the data transmission path. In addition, even when the memory accesses are overlapped with each other, the data transmission path is controlled by the memory access control circuit 807, so that memory access is made to wait until the memory access being executed is terminated, whereby contradiction does not occur in processing. Furthermore, data requesting memory accesses are inputted in parallel, so that the memory accesses can be densely made, as compared with a system of making memory access by data from the conventional single input.

FIG. 12, is a diagram showing a structure of one embodiment of the memory reading portions 802A and 802B shown in FIG. 10 (or FIG. 11). Description is made on an operation to occur when word data of M words constitute a packet data and 1≦N≦M. Reading of data from a matching memory 63 is completed before a leading word (first word) is held in a data latch 104B (1), so that data from a memory output port 101 is determined. However, if and when data from a memory output port 101 (N) is held until the word data of the N-th word is held in a data latch 104B (N), a data latch 102 (N) can be omitted.

Switches 103S each have a function of allowing passage of one input of the two input data by a control signal 105. The above described respective switches are controlled by data held in a data transmission path 104. For example, memory data corresponding to the N-th word of the packet data is held in the data latch 101 (N) or 102 (N). When the packet data in the N-th word is held in a data latch 104B (N+1), a switch 103S (N) allows the passage of data in the data latch 102 (N) according to information identifying a word of the word data while operating to allow the passage of a data latch 103A (N+1) at the other time, so that memory data is held in a data latch 103A (N) at timings at which the word data is held in 104B (N). The above described method is used with respect to all word data in the packet data. Data held in the data latch 102 is held at the same timings as those of corresponding word data in the inputted packet data transmitted through the data transmission path 104 in response to the control signal 106, to be sent out to a data transmission path 103 by a function of the above described switch 103S. Considering a case in which the above described identifier exists in the first word in the packet data, if reading from the matching memory 806 is performed in the transmission time between stages when the first data is transmitted from the data latch 104B (2) to 104B (1) and the read data is held in the data latch 102 at timings at which the first word is held in the data latch 104B (1), reading from the matching memory 806 is completed in the transmission delay time per one stage of the data transmission path. In this case, the reading authorizing signal from the memory access control circuit 807 controls the passage of the first word through the data latch 104B (2).

FIG. 13 is a diagram showing a structure of one embodiment of the memory writing portions 805A and 805B shown in FIG. 10 (or FIG. 11). Description is now made on an operation to occur when word data of M words constitute packet data, 1≦N≦M, all the word data in the packet data are held at the same timings in a data latch transmission of which is controlled and the data are written into a matching memory 806. For example, when word data corresponding to the N-th word in the packet data is held in a data latch 202, the word data is also held in a data latch 201 (N) by a data latch control signal 207 (N) generated from information identifying the word of the word data at timings at which the word data is held in a data latch 203. The above described control is performed with respect to all the word data in the packet data transmitted through a data transmission path 205. When each of the word data is held in the data latch 203, the word data is held in the corresponding data latch out of data latches 201. When the M-th word, which is the last word, is held in the data latch 203, the entire packet data is held in the corresponding data latches out of the data latches 201. These held data start to be written into the above described matching memory 806 at timings at which the M-th word data is held in the data latch 203. If the data in the data latches 201 are written into the matching memory 806 before the M-th word is held in a data latch 204, writing processing is completed at the transmission delay time per one stage of the data transmission path. In this case, the writing authorizing signal from the memory access control circuit 807 controls the passage of the M-th word through the data latch 203.

FIG. 14 is a block diagram showing a structure in still another embodiment of a template matching portion having two input ports and two parallel data transmission paths. As shown in the figure, this template matching portion comprises data transmission paths 8001A and 8001B, a processing arbitrating circuit 8002, and a function portion 8003. The data transmission paths 8001A and 8001B are each constituted by data holding mechanisms D such as data latches in a plurality of stages which are successively connected to each other. Transmission of data through the data holding mechanisms is controlled by an external clock. A control signal generated by a control circuit according to handshaking transfer control, or the like. On each of the above described data transmission paths 8001A and 8001B, there are respective two pipeline stages 8011A and 8012A and 8011B and 8012B which perform processing such as memory access in the function portion 8003. The processing arbitrating circuit 8002 receives a processing request for the function portion 8003 by request signals 251A, 251B, 252A and 252B from the pipeline stages 8011A, 8012A and 8012B. If it determines that the above described processing is not performed in the function portion 8003 by an execution signal 261 from the function portion 8003, it authorizes execution of processing in the function portion 8003 with respect to any one of the pipeline stages 8011A and 8012A and 8011B and 8012B by authorizing signals 241A, 241B, 242A and 242B. On the other hand, if it determines that the above described processing is performed in the function portion 8003, it does not authorize execution in the function portion 8003 with respect to any pipeline stage until the processing is terminated. It is the same with a structure in which there is one data transmission path or more and there is at least one pipeline stage performing processing in the same function portion on one data transmission path.

FIG. 15 is a diagram showing a structure according to one embodiment of the above described processing arbitrating circuit 8002 used in FIG. 14. The above described processing arbitrating circuit 8002 is constituted by a plurality of state storing circuits for storing the order of generation of processing requests. A state storing circuit 211 stores the order of generation of processing requests of the pipeline stages 8011A and 8011B, a state storing circuit 212 stores the order of generation of processing requests of the pipeline stages 8012A and 8012B, and a state storing circuit 213 stores the order of generation of processing requests of the pipeline stages 8011A or 8011B and 8012A or 8012B. In the state storing circuit 211, state storing signals 231A and 231B storing states of the processing requests are generated based on request signals 251A and 251B from the pipeline stages 8011A and 8011B. A state storing signal 221C is generated from the state storing signals 231A and 231B. In the state storing circuit 212, state storing signals 232A and 232B storing states of processing requests are generated based on request signals 252A and 252B from the pipeline stages 8012A and 8012B. A state storing signal 222C is generated from the state storing signals 232A and 232B. In the state storing circuit 213, state storing signals 231C and 232C storing states of the state storing signals 221C and 222C are generated from the state storing signals 221C and 222C. The state storing signals 231A, 231B and 231C, the state storing signals 232A, 232B and 232C, and an execution signal 261 showing an executing state of the function portion 8003 constitute authorizing signals 241A, 241B, 242A and 242B of the pipeline stages 8011A, 8011B, 8012A and 8012B. A pipeline stage in which processing in the above described function portion 8003 is authorized performs processing in the above described function portion 8003, while the other pipeline stages wait for execution from the time when execution of the authorized processing is terminated to the next authorization.

FIG. 16 is a circuit diagram according to one embodiment of a state storing circuit employed in the processing arbitrating circuit 8002. Assuming that a request signal 251A or 251B is at an "L" level in a state in which a request is generated and a state storing signal 231A or 231B is at an "L" level in a state in which generation of a processing request is stored, an initialization signal 281 is brought to the "L" level and the request signals 251A and 251B are brought to an "H" level, to initialize a state storing circuit such that the state storing signal 231A is at the "L" level and the state string signal 231B is at the "H" level. When the request signal 251A is changed from the "H" level to the "L" level and the request signal 251B is at the "H" level, the state storing signal 231A attains the "H" level and the state storing signal 231B attains the "L" level. The reverse is the same. If and when the request signal 251A is changed from the "H" level to the "L" level and the request signal 251B is changed from the "H" level to the "L" level before the request signal 251A is returned again to the "H" level, the state storing signal 231A attains the "H" level and the state storing signal 231B attains the "L" level. Thus, the state storing signals 231A and 231B are not changed irrespective of the change in the request signal 251B. The reverse is the same. When both the request signals 251A and 251B are at the "L" level and the request signal 251A is changed to the "H" level, the state storing signal 231A attains the "H" level and the state storing signal 231B attains the "L" level. Although in the present embodiment, the state storing circuit is constituted by a NAND gate, it can be achieved by a NOR gate in the same structure if the plurality of a signal is inverted.

Although the present invention has been described and illustrated in detail, it is clearly understood that the same is by way of illustration and example only and is not to be taken by way of limitation, the spirit and scope of the present invention being limited only by the terms of the appended claims. 

What is claimed is:
 1. A data processor comprising:a pre-detecting portion; said pre-detecting portion including,a data detecting means, having a plurality of parallel input ports and a plurality of data transmission paths, each of a plurality of stages, subsequent to the input ports, for detecting a time period in which data exist for each of the data transmission paths, comparing and determining means for comparing identifiers, each identifier being at least a part of the data, during a time period in which data are detected by said data detecting means in each of the data transmission paths, and flag generating means for generating a flag indicating a match of identifiers for the data on each of the data transmission paths and access contention in a matching memory based on a result of the comparison obtained by said comparing and determining means, for detecting in advance said access contention, for maintaining the data on each of the data transmission paths, and for adding said flag to the maintained data; and a template matching portion, wherein said template matching portion includes data transmission paths, each having one or more input ports corresponding to outputs of said pre-detecting portion and capable performing in a pipeline processing mode, a matching memory having addresses corresponding to the identifiers of the data in which one or more identifiers are allocated to one address when a number of identifiers is larger than a number of the addresses, memory access control means for arbitrating data transmission such that accesses to said matching memory are not simultaneously made with respect to at least one data transmission path, access being made in the order from reading and writing data not being read out until writing of previous data is terminated, coincidence determining means for determining data queuing in said matching memory according to a priority added in advance to an identifier of the data when access contention occurs in said matching memory, and data processing means for replacing data in said matching memory, combining data or erasing data in said matching memory based on a result of the determination by said coincidence determining means such that pipeline processing of respective data is performed in parallel with respect to an input of data on at least one parallel data transmission paths and template matching is performed at high speed.
 2. The data processor of claim 1, further including,coexistence detecting means for detecting a common period in the time periods during which data is detected on two of the plurality of data transmission paths, said comparing and determining means comparing during said common period.
 3. The data processor of claim 2, wherein a number of the plurality of stages of the data transmission paths are made coincident with each other such that a time period for comparing by the comparing means becomes equal to the time period originally detected by the data detecting means to ensure accurate subsequent processing.
 4. The data processor of claim 1, wherein the data transmission paths are each of a same directionality such that existing data on each of the transmission paths proceed in a single, common direction.
 5. A data processor comprising:a plurality of data transmission paths for transmitting data in packets; a matching memory having at least one input port connected to the data transmission paths and at least one address corresponding to an identifier, said identifier being at least a part of inputted from the input port, the matching memory including,first memory reading means for detecting presence of a flag in a data packet on one of the data transmission paths, the flag indicating a data packet on one transmission path with an identifier matching a data packet on another transmission path, and maintaining the detected data packet with the flag at a constant point on the transmission path until another data packet with a flag is detected on the other transmission path, second memory reading means for, upon the first memory reading means failing to detect the presence of a flag in the data packet, reading previously stored data from said matching memory according to the address corresponding to said identifier of the input data; comparing and determining means for comparing the previously stored data read out from said matching memory by said second memory reading means with the input data; data processing means for processing each data based on a result on the comparison and for, if the first memory reading means detects presence of the flag in the data packet, combining the data packet on the one transmission path with the data packet on the other transmission path for subsequent output; memory writing means for writing a result of the processing by said data processing means into said matching memory at the address corresponding to said identifier of the data; and memory access control means for arbitrating data transmission on said data transmission paths to prevent simultaneous accesses to said matching memory with respect to two or more data packets transmitted on the data transmission paths, such that respective data are processed in a parallel pipeline manner and template matching is performed at high speed.
 6. A data processor comprising:data transmission paths for transmitting data packets; a matching memory having at least one input port connected to the data transmission paths and at least one address corresponding to an identifier, said identifier being at least a part of a data packet having word data, inputted from one of the data transmission paths through the input port, the matching memory including,first memory reading means for detecting presence of a flag in a data packet on one of the data transmission paths, the flag indicating a data packet on one transmission path with an identifier matching a data packet on another transmission path, and maintaining the detected data packet with the flag at a constant point on the transmission path until another data packet with a flag is detected on the other transmission path, second memory reading means for, upon the first memory means failing to detect the presence of a flag in the data packet, reading previously stored data from said matching memory located at the address corresponding to said identifier of the input data packet; comparing and determining means for comparing the read data with said identifier of the input data packet and for determining a relationship therebetween; data processing means for combining the data packet on the one transmission path with the data packet on the other transmission path upon the first memory reading means detecting presence of the flag, for processing the data and for combining contents of the inputted data and the read data for subsequent output based upon the first memory reading means failing to detect the presence of the flag and upon the comparison obtained by said comparing and determining means being a match, and for determining priority between the input and read data upon the first memory reading means failing to detect the presence of the flag and upon the comparison obtained by the comparing and determining means failing to indicate a match; memory writing means for writing data processed by said data processing means, with the highest relative determined priority, into said matching memory at the address corresponding to said identifier of the data packet upon the data processing means determining priority; and memory access control means for arbitrating data transmission on said data transmission paths to prevent simultaneous accesses to said matching memory with respect to two or more data packets transmitted on the data transmission paths such that respective data are processed in a parallel pipeline manner and template matching is performed at high speed.
 7. A data processing method comprising the steps of:(a) detecting a time period in which data exists in each of a plurality of data transmission paths, each of a plurality of stages; (b) comparing identifiers, each identifier being at least a part of the data, during a time period in which data are detected in said step (a) in each of the data transmission paths; (c) generating a flag indicating a match of identifiers for the data between the data transmission paths and access contention in a matching memory based on a result of the comparison obtained in said step (b); (d) detecting, in advance, the access contention; (e) maintaining the data on each of the data transmission paths; and (f) adding the flag to the maintained data; (g) arbitrating data transmission such that accesses to a matching memory are not simultaneously made with respect to at least one data transmission path, access is being made in the order from reading and writing data not being read out until writing of previous data is terminated; (h) determining data queuing in the matching memory according to a priority added in advance to an identifier of the data when access contention occurs in the matching memory; and (i) replacing data in the matching memory by combining data or erasing data in the matching memory based on a result of the determination in said step (h) such that pipeline processing of respective data is performed in parallel with respect to an input of data on at least one parallel data transmission path and template matching is performed at high speed.
 8. The data processing method of claim 7, further including the step of;(g) detecting a common period in the time periods during which data is detected on two of the plurality of data transmission paths, said comparing of step (b) occurring during the common period.
 9. The data processing method of claim 8, wherein a number of the plurality of stages of the data transmission paths are made coincident with each other such that a time period for comparing in step (b) becomes equal to the time period originally detected in step (a) to ensure accurate subsequent processing.
 10. The data processing method of claim 7, wherein the data transmission paths are each of a same directionality such that existing data on each of the transmission paths proceeds in a single, common direction.
 11. A data processing method, comprising the steps of:(a) detecting presence of a flag in a data packet on one of a plurality of data transmission paths, the flag indicating a data packet on one transmission path with an identifier matching a data packet on another transmission path; (b) maintaining the detected data packet with the flag at a constant point on the transmission path until another data packet with a flag is detected on the other transmission path; (c) reading, upon said step (a) failing to detect the presence of a flag in the data packet, previously stored data from a matching memory according to the address corresponding to the identifier of the input data; (d) comparing the previously stored data read out from the matching memory in said step (c) with the input data; (e) processing each data based on a result on the comparison; (f) combining, if presence of the flag is detected in the data packet in said step (a), the data packet on the one transmission path with the data packet on the other transmission path for subsequent output; (g) writing a result of the processing of said step (e) into the matching memory at the address corresponding to the identifier of the data; and (h) arbitrating data transmission on the data transmission paths to prevent simultaneous accesses to the matching memory with respect to two or more data packets transmitted on the data transmission paths, such that respective data are processed in a parallel pipeline manner and template matching is performed at high speed.
 12. A data processing method, comprising the steps of:(a) detecting presence of a flag in a data packet on one of a plurality of data transmission paths, the flag indicating a data packet on one transmission path with an identifier matching a data packet on another transmission path; (b) maintaining the detected data packet with the flag at a constant point on the transmission path until another data packet with a flag is detected on the other transmission path; (c) reading, upon said step (a) failing to detect the presence of a flag in the data packet, previously stored data from a matching memory located at the address corresponding to the identifier of the input data packet; (d) comparing the read data with the identifier of the input data packet and determining a relationship therebetween; (e) combining the data packet on the one transmission path with the data packet on the other transmission path upon said step (a) detecting presence of the flag; (f) processing the data contents of the inputted data and the read data for subsequent output based upon the failure to detect the presence of the flag in said step (a) and upon the comparison in said step (d) being a match; (g) determining priority between the input and read data upon the failure to detect the presence of the flag in said step (a) and upon the comparison in said step (d) failing to indicate a match; (h) writing data processed in said step (f) with the highest relative determined priority into the matching memory at the address corresponding to the identifier of the data packet, upon the determining of priority in step (g); (i) arbitrating data transmission on the data transmission paths to prevent simultaneous accesses to the matching memory with respect to two or more data packets transmitted on the data transmission paths such that respective data re processed in a parallel pipeline manner and template matching is performed at high speed. 